from selenium import webdriver
from selenium.webdriver.common.by import By
import time
import pytest
from selenium.webdriver.common.keys import Keys
@pytest.fixture()
def driver():
    driver=webdriver.Edge()
    driver.get('http://10.59.9.12:7001/')
    driver.maximize_window()

    yield driver
    driver.quit()
def test_A3mall_login(driver):
    driver.find_element(By.XPATH,'/html/body/div[1]/div/div[2]/ul/li[1]/a').click()
    time.sleep(2)
    dy1=driver.find_element(By.CLASS_NAME,'reg-new').text
    print(dy1)
    time.sleep(2)
    driver.find_element(By.XPATH,'//*[@id="theForm"]/div[1]/span[2]/input').send_keys('13811033962')
    driver.find_element(By.XPATH,'//*[@id="theForm"]/div[2]/span[2]/input').send_keys('123456')
    time.sleep(10)
    driver.find_element(By.XPATH, '//*[@id="theForm"]/div[2]/span[2]/input').send_keys(Keys.ENTER)
    time.sleep(2)
    driver.find_element(By.XPATH,'/html/body/div[3]/div[2]/ul/li[1]/a').click()
    time.sleep(2)
    dy2=driver.find_element(By.XPATH,'/html/body/div[1]/div/div[2]/ul/li[1]/a').text
    print(dy2)
    time.sleep(2)


